package com.permission_server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @TableName sys_permission
 */
@TableName(value = "sys_permission")
@Data
@ApiModel(value = "com.permission_server.entity.SysPermissionEntity", description = "菜单权限")
public class SysPermissionEntity implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID", dataType = "String")
    private String id;

    /**
     * 父ID
     */
    @TableField(value = "parent_id")
    @ApiModelProperty(value = "父ID", dataType = "String")
    private String parentId;

    /**
     * 菜单名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value = "菜单名称", dataType = "String")
    private String name;

    /**
     * 访问路由
     */
    @TableField(value = "path")
    @ApiModelProperty(value = "访问路由", dataType = "String")
    private String path;

    /**
     * 组件路由
     */
    @TableField(value = "component")
    @ApiModelProperty(value = "组件路由", dataType = "String")
    private String component;

    /**
     * 路由名称
     */
    @TableField(value = "router_name")
    @ApiModelProperty(value = "路由名称", dataType = "String")
    private String routerName;

    /**
     * 重定向路由
     */
    @TableField(value = "redirect")
    @ApiModelProperty(value = "重定向路由", dataType = "String")
    private String redirect;

    /**
     * 菜单类型(0:一级菜单，1:子菜单，2:按钮权限)
     */
    @TableField(value = "menu_type")
    @ApiModelProperty(value = "菜单类型(0:一级菜单，1:子菜单，2:按钮权限)", dataType = "Integer")
    private Integer menuType;

    /**
     * 菜单图标
     */
    @TableField(value = "icon")
    @ApiModelProperty(value = "菜单图标", dataType = "String")
    private String icon;

    /**
     * 是否路由菜单(0:不是，1:是（默认值1）)
     */
    @TableField(value = "is_route")
    @ApiModelProperty(value = "是否路由菜单(0:不是，1:是（默认值1）)", dataType = "Boolean")
    private Boolean isRoute;

    /**
     * 是否叶子节点(1:是，0:不是)
     */
    @TableField(value = "is_leaf")
    @ApiModelProperty(value = "是否叶子节点(1:是，0:不是)", dataType = "Boolean")
    private Boolean isLeaf;

    /**
     * 是否缓存该页面(1:是，0:不是)
     */
    @TableField(value = "keep_alive")
    @ApiModelProperty(value = "是否缓存该页面(1:是，0:不是)", dataType = "Boolean")
    private Boolean keepAlive;

    /**
     * 是否隐藏路由(0否，1是)
     */
    @TableField(value = "hidden")
    @ApiModelProperty(value = "是否隐藏路由(0否，1是)", dataType = "Boolean")
    private Boolean hidden;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    @ApiModelProperty(value = "创建者", dataType = "String")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    private Date createTime;

    /**
     * 更新者
     */
    @TableField(value = "update_by")
    @ApiModelProperty(value = "更新者", dataType = "String")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间", dataType = "Date")
    private Date updateTime;

    /**
     * 是否删除(0:正常，1:已删除)
     */
    @TableField(value = "del_flag")
    @ApiModelProperty(value = "是否删除(0:正常，1:已删除)", dataType = "Boolean")
    private Boolean delFlag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
